package cn.shopex.multiimagepreview.app;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import java.util.ArrayList;

import cn.shopex.multiimagepreview.R;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button button= (Button) findViewById(R.id.click_img);

        final ArrayList<GiftBean> list  =new ArrayList<>();
        list.add(new GiftBean("https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1479038272&di=f2e322a2b0df8418d0d6e94577ca1a29&src=http://c.hiphotos.baidu.com/image/pic/item/0dd7912397dda1449fad6f63b6b7d0a20df486be.jpg"));
        list.add(new GiftBean("http://a.hiphotos.baidu.com/image/pic/item/aa18972bd40735fa4eca4d689a510fb30f24082c.jpg"));
        list.add(new GiftBean("http://e.hiphotos.baidu.com/image/pic/item/d000baa1cd11728bcb188ff3ccfcc3cec3fd2c2d.jpg"));
        list.add(new GiftBean("http://f.hiphotos.baidu.com/image/h%3D360/sign=ba4bbbdf1b30e924d0a49a377c096e66/242dd42a2834349bbe78c852cdea15ce37d3beef.jpg"));
        list.add(new GiftBean("http://f.hiphotos.baidu.com/image/h%3D360/sign=76a2918f0bb30f242a9aea05f894d192/a8014c086e061d9507500dd67ff40ad163d9cacd.jpg"));
        list.add(new GiftBean("http://d.hiphotos.baidu.com/image/h%3D360/sign=e0a211de5eafa40f23c6c8db9b65038c/562c11dfa9ec8a13f075f10cf303918fa1ecc0eb.jpg"));
        list.add(new GiftBean("http://h.hiphotos.baidu.com/image/h%3D360/sign=e6bd967ff203738dc14a0a248319b073/08f790529822720e534f0b257fcb0a46f31fab68.jpg"));
        list.add(new GiftBean("http://c.hiphotos.baidu.com/image/h%3D360/sign=9482a15fd2160924c325a41de406359b/a08b87d6277f9e2f2577db011d30e924b899f37d.jpg"));
        list.add(new GiftBean("http://g.hiphotos.baidu.com/image/h%3D360/sign=45d2b2d6cbfc1e17e2bf8a377a91f67c/42166d224f4a20a44058390794529822730ed0af.jpg"));
        list.add(new GiftBean("http://a.hiphotos.baidu.com/image/h%3D360/sign=adabcd09e7dde711f8d245f097eecef4/71cf3bc79f3df8dca9c9f29dcf11728b461028c1.jpg"));
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                int position = 3;
                Intent intent = new Intent(MainActivity.this, GalleryActivity.class);
                intent.putExtra("position", position);
                intent.putExtra("Extra_List", list);
                startActivity(intent);
            }
        });
    }


}
